package com.jackchen.service;

import java.util.List;
import java.util.Map;
import java.io.Serializable;

public interface IBaseService {
	
	public Serializable insert(Object entity);
	
	public void update(Object entity);
	
	public void saveOrUpdate(Object entity);
	
	public void deleteAll(List list);
	
	public <T> void deleteById(Class<T> entityClassName,Serializable deleteId);
	
	public List findAll(String aClassName);
	
	public List findByExample(Object aObject);
	
	public List findByPropertyName(String aPropertyName,Object aObject);
	
	public Map findByPage(String aClassName,int aPageSize,int aStartRow);
	
	public List<Object> findObjBySql(String sql, Object...objects);
	
	public List<Object> findObjByHSql(String sql, Object...objects);
	/**
	 * @author yu
	 * @param entityClass
	 * @param id
	 * @return
	 */
	public <E> E findById(Class<E> entityClass, Serializable id);
}
